const app = new Vue({
    el: 'app',
    data:{
        bookList: [
            {
                name: '《算法导论》',
                date: '2006-9',
                price: 85.00,
                number: '1',
            },
            {
                name: '《UNIX编程艺术》',
                date: '2006-2',
                price: 59.00,
                number: '1',
            },
            {
                name: '《编程珠玑》',
                date: '2008-10',
                price: 39.00,
                number: '1',
            },
            {
                name: '《代码大全》',
                date: '2006-3',
                price: 128.00,
                number: '1',
            }
        ]
    },
    methods: {
        getAllPrice(){
            let sum = 0.00;
            for (let index = 0; index < this.bookList.length; index++) {
                sum += bookList[index].price;
            }
            return sum;
        }
    },
})